//
//  BKGDMainBottomView.h
//  BESTKEEP
//
//  Created by 武探 on 2016/10/12.
//  Copyright © 2016年 YISHANG. All rights reserved.
//

#import <UIKit/UIKit.h>

@class BKGDMainBottomView;

typedef NS_ENUM(NSInteger,BKGDMainBottomViewItemType) {
    
    ///购物车
    BKGDMainBottomViewItemTypeShoppingCar = 1 << 0,
    ///收藏
    BKGDMainBottomViewItemTypeFavorite = 1 << 1,
    ///购买
    BKGDMainBottomViewItemTypeBuy = 1 << 2,
    ///出价
    BKGDMainBottomViewItemTypeBid = 1 << 3,
    ///到货通知
    BKGDMainBottomViewItemTypeArrivalNotice = 1 << 4,
    ///加入购物车
    BKGDMainBottomViewItemTypeAddShoppingCar = 1 << 5,
    
    ///已经收藏
    BKGDMainBottomViewItemTypeFavoriteAlready = 1 << 6,
    ///禁止状态
    BKGDMainBottomViewItemTypeDisabled = 1 << 7,
    
    ///囤货预购
    BKGDMainBottomViewItemStockUpPreOrder = 1 << 8
};

@interface BKGDMainBottomViewItem : NSObject

/**
 标题 type 为 Share Favrite 下设置无效 
 */
@property(nonatomic,strong) NSString *title;
@property(nonatomic,assign) CGFloat width;
@property(nonatomic,assign) BKGDMainBottomViewItemType type;
@property(nonatomic,strong) NSString *badgeValue;
@property(nonatomic,strong) UIColor *backgroundColor;

-(instancetype)initWithTitle:(NSString*)title width:(CGFloat)width type:(BKGDMainBottomViewItemType)type;

@end


@protocol BKGDMainBottomViewDelegate <NSObject>

@required
-(void)bottomView:(BKGDMainBottomView*)view didSelectAtType:(BKGDMainBottomViewItemType)type;

@end

@interface BKGDMainBottomView : UIView

@property(nonatomic,weak) id<BKGDMainBottomViewDelegate> delegate;
@property(nonatomic,strong) NSArray<BKGDMainBottomViewItem*> *items;

-(void)reloadAtIndex:(NSInteger)index;

@end
